package com.zzh.Proxy;

/**
 * @author 张占恒.
 * @date 2020/8/27.
 * @time 11:54.
 * 真实的类
 */
public class Realimage implements  Image {
    private String fileName;

    public Realimage(String fileName){
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }
    private void loadFromDisk(String fileName) {
        System.out.println("Loading " + fileName);
    }
}
